﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CycleTimeReport.CApCTRSettingsTimerInfoSupportPriority
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;


namespace DnProcessSimulateCommands.CycleTimeReport;

public class CApCTRSettingsTimerInfoSupportPriority : CApCTRSettingsTimerInfo
{
  public int TimerPriority { get; set; }

  public double MaximumPriority => 100.0;

  public double MinimumPriority => 1.0;

  public CApCTRSettingsTimerInfoSupportPriority(string timerName)
    : base(timerName)
  {
    this.TimerActive = true;
    this.TimerPriority = 5;
  }

  public override string ToString() => base.ToString() + "," + this.TimerPriority.ToString();

  public override void SetFromString(string value)
  {
    string[] strArray = value.Split(',');
    base.SetFromString(strArray[0]);
    int num = Convert.ToInt32(strArray[1]);
    if (num > 100 || num < 1)
      num = 5;
    this.TimerPriority = num;
  }
}
